-- use a second order polynomial to approximate (*very* closely)
-- the Debye Hückel parameter at any temperature
put (0.4918 + 0.0006614*T + 0.000004975*T^2) into DH
return DH
end DebyeHuckel
on mouseUp
put card field "T" into T
put DebyeHuckel(T) into A
put A into card field "A"
put card field "I" into i
put sqrt(card field "I") into si
put card field "za" into za
put (2 * za - 1) * (A * si/(1 + si) - 0.1*i) into corr
if corr > 0 then
put "plus " into sign
else
put "minus " into sign
end if
if corr = 0 then
put "(no correction)" into card field "corr"
else
put sign && abs (corr) into card field "corr"
end if
end mouseUp
-- part 6 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=96 top=192 right=212 bottom=131
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 14
-- style flags: 0
-- line height: 18
-- part name: T
-- part 9 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=176 top=191 right=211 bottom=229
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 20
-- text size: 14
-- style flags: 0
-- line height: 18
-- part name: A
-- part 12 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=22 top=258 right=280 bottom=94
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Explain
----- HyperTalk script -----
on mouseUp
set the visible of card field "explain" to not the visible of card field "explain"
end mouseUp
-- part 14 (field)
-- low flags: 01
-- high flags: 0001
-- rect: left=95 top=292 right=318 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name:
-- part 13 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=95 top=238 right=313 bottom=464
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: explain
-- part 15 (button)
-- low flags: 00
-- high flags: 2000
-- rect: left=22 top=129 right=169 bottom=66
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: oops
----- HyperTalk script -----
on mouseUp
show card field "oops"
wait 100
hide card field "oops"
end mouseUp
-- part 16 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=153 top=133 right=186 bottom=302
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: oops
-- part contents for card part 1
----- text -----
The pKa of a weak acid or base is dependent upon the ionic strength (I) of the medium, according to this equation...
-- part contents for card part 2
----- text -----
0.1
-- part contents for card part 4
----- text -----
minus 0.112876
-- part contents for card part 3
----- text -----
0
-- part contents for card part 6
----- text -----
25
-- part contents for card part 9
----- text -----
0.511444
-- part contents for card part 13
----- text -----
Enter values for ionic strength, the charge on the acidic buffer component (e.g., zero for acetate buffers, 1 for Tris buffers) and the temperature in °C. The "Calculate" button will work out the amount by which the pK is affected by ionic strength. Now click 'Explain' again to make this field go away...
-- part contents for card part 14
----- text -----
(Note that the temperature compensation of pKa is not included here..)
-- part contents for card part 16
----- text -----
Not "2.za + 1", which was misprinted in the CABIOS article